from myelin.Ns import MYELIN, MYELINS


from nodetypes.Ns import NODETYPE_NS
from nodetypes.ntypes.Container import Container
from nodetypes.models.Topic import Topic as TopicModel

#import view #, \
    #showGroupings

class Topic(Container):
    
    typeInfo = {
        'key' : u'topic',
        'name' : u'Topic',
        'namespace-uri' : NODETYPE_NS,
    }
    
    model = TopicModel
    
    ACTIONS = {
        #'view'              : view.TRANSFORMS,
        #'show-groupings'    : showGroupings.TRANSFORMS,
    }
    
    #ACTIONS = {
    #    'new-file' : File.constructors['new'],
    #    
    #    #'new-section' : Section.constructors['new'],
    #    
    #    'view' : ViewAction({
    #        'html': TransformChain(Container.actions['view']['html'][0:-1]+
    #                [TransformMap('%(xslt-base-uri)s/formats/html/myelin/myelin/view.xslt',
    #                              ['%(i18n-common-base-uri)s/formats/html/myelin/myelin/view.xml',
    #                              '%(i18n-theme-base-uri)s/formats/html/myelin/myelin/view.xml'])
    #                ]),                    
    #        'html-print' : TransformChain(Container.actions['view']['html'][0:-1]+
    #                [TransformMap('%(xslt-base-uri)s/formats/html/myelin/%(key)s/view.xslt',
    #                              ['%(i18n-common-base-uri)s/formats/html/myelin/myelin/view.xml',
    #                              '%(i18n-theme-base-uri)s/formats/html/myelin/myelin/view.xml'])
    #                ]),      
    #    }),
    #    
    #    #'edit' : EditAction({
    #    #    'html' : TransformChain(Container.actions['edit']['html'][0:-1]+
    #    #             ['formats/html/myelin/topic/edit.xslt']),
    #    #}),
    #    #
    #    #'translate' : EditAction({
    #    #    'html' : TransformChain(Document.actions['translate']['html'][0:-1]+
    #    #             ['formats/html/myelin/topic/translate.xslt'])
    #    #}),
    #    #
    #    #'delete' : EditAction({
    #    #    'html' : TransformChain(Container.actions['delete']['html'][0:-1] +
    #    #             ['formats/html/myelin/topic/delete.xslt'])
    #    #}),
    #    #
    #    #'purge-deleted' : MaintenanceAction ({
    #    #    'html' : TransformChain(Container.actions['purge-deleted']['html'][0:-1] +
    #    #             ['formats/html/myelin/topic/purge-deleted.xslt'])
    #    #}),
    #    #
    #    #'lock' : RevisionControlAction({
    #    #    'html' : TransformChain(Document['actions']['lock']['html'][0:-1] +
    #    #             ['formats/html/myelin/topic/lock.xslt'])
    #    #}),
    #    #
    #    #'show-groupings': ViewAction({
    #    #    'html' : TransformChain(Container.actions['show-groupings']['html'][0:-1] +
    #    #             ['formats/html/myelin/topic/purge-deleted.xslt']),
    #    #    'html-print' : TransformChain(Container.actions['show-groupings']['html-print'][0:-1] +
    #    #             ['formats/html/myelin/topic/show-groupings.xslt'])
    #    #}),
    #    #
    #    #'view-inactive': ViewAction({
    #    #    'html' : TransformChain(Container.actions['view-inactive']['html'][0:-1] +
    #    #             ['formats/html/myelin/topic/view-inactive.xslt']),
    #    #    'html-print' : TransformChain(Container.actions['view-inactive']['html-print'][0:-1] +
    #    #             ['formats/html/myelin/topic/view-inactive.xslt'])
    #    #})
    #}
    #    
    #CONSTRUCTORS = {
    #    'new': NewAction({
    #        'html': TransformChain(['modules/myelin/account-html.xslt',
    #                 'modules/myelin/container/source.xslt',
    #                 'modules/myelin/topic/new-xform.xslt',
    #                 'modules/myelin/container./new.xslt',
    #                 'formats/myelin/container/new.xslt'])
    #    })
    #}
    
    

NODE_TYPES = {
    MYELIN + 'Topic' : Topic,   
}


    